import { createRouter, createWebHistory } from 'vue-router'

const routes = [
  { path: '/', component: () => import('@/views/Login.vue') },
  {
    path: '/',
    component: () => import('@/layout/DefaultLayout.vue'),
    children: [
      { path: 'dashboard', component: () => import('@/views/Dashboard.vue') },
      { path: 'member/add', component: () => import('@/views/member/AddMember.vue') },
      { path: 'member/list', component: () => import('@/views/member/MemberList.vue') },
      { path: 'score/add', component: () => import('@/views/score/AddScore.vue') },
      { path: 'score/query', component: () => import('@/views/score/ScoreQuery.vue') }
    ]
  }
]

const router = createRouter({
  history: createWebHistory(),
  routes
})

export default router
